package com.mq.myrule;


import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Configuration;

/**
 * 改变Ribbon 轮训算法变成随机算法
 */
@Configuration
public class MySelfRule {
    public IRule myirule(){
        return new RandomRule();//定义为随机
    }
}
